package org.daochong.fastdev;

import java.sql.SQLException;
import java.util.Map;

import org.daochong.lang.Properties;

public interface IExecutor {

	public Context exec(String prefix, String id, Map<String, Object> params, Object source);
	
	public Context exec(String prefix, String id, Map<String, Object> params,Map<String, Object> attrs, Object source);

	public Context execJpa(String entity, String method, Map<String, Object> params, Object source);

	public Context execJpa(String entity, String method, Map<String, Object> params,Map<String, Object> attrs, Object source);
	
	public Context execJpa(Class<?> clazz, String method, Map<String, Object> params, Object source);
	
	public Context execJpa(Class<?> clazz, String method, Map<String, Object> params, Map<String, Object> attrs, Object source);

	public void exec(Properties config, Context context) throws SQLException;

	public Object getBean(String name);

	public <T> T getBean(Class<T> clazz);
}
